﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace FineUI.Examples
{
    public partial class major_insertKeCheng : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string major_id = Request.QueryString["major_id"];
            int m = int.Parse(major_id);
            //Response.Write(m);
        }
        public void btnInsert_Click(object sender, EventArgs e)
        {
            string kecheng_name = TextBox6.Text;
            string a = TextBox1.Text.Trim();
            string c = TextBox2.Text.Trim();
            string d = TextBox3.Text.Trim();
            string eee = TextBox4.Text.Trim();
            string f = TextBox5.Text.Trim();

            string id = Request.QueryString["major_id"];
            int major_id = int.Parse(id);
            Maticsoft.BLL.major majorinfo = new Maticsoft.BLL.major();
            bool flag = majorinfo.insertKechengInfo(kecheng_name,a,c,d,eee,f,major_id);
            if (flag)
            {
                Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('添加课程成功，请返回！');</script>");
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('添加课程成功，请返回！');</script>");
            }
        }
    }

}